In current mobile phones, laptops, and other portable electronic devices, determining a state of charge (SOC) of the battery (e.g., a lithium battery) is important in the common usage of the devices. An SOC measurement can allow the user to have an objective understanding towards remaining power, and also to adjust usage patterns as may be necessary to prolong the power.